package com.hxkj.controller.taglib;

import com.alibaba.fastjson.JSONObject;
import com.hxkj.domain.po.Article;
import com.hxkj.domain.po.Column;
import com.hxkj.domain.po.Tags;
import com.hxkj.service.taglib.AnakyzeFreeMakerService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.concurrent.Callable;

/**
 * @ClassName CreateFreeMakerColumnController
 * @Description TODO
 * @Author Mr.zheng
 * @Date 2018/8/2 10:39
 * @Version 1.0
 */
@RestController
@RequestMapping("/create")
public class AnakyzeFreeMakerController {

    @Autowired
    private AnakyzeFreeMakerService anakyzeFreeMakerService;

    /**
     * @Description analyzeColumn 自定义标签解析文章分类单个或多个
     **/
    @RequestMapping(value = "/columnFreeMaker")
    public void createFreeMakerColumn(@ModelAttribute Column column) throws Exception{
        anakyzeFreeMakerService.createFreeMakerColumn(column);
    }

    /**
    * @Description createFreeMakerArticle 自定义标签解析文章多篇或单篇
    **/
    @RequestMapping(value = "/articleFreeMaker")
    public void createFreeMakerArticle(@ModelAttribute Article article) throws Exception{
        anakyzeFreeMakerService.createFreeMakerArticle(article);
    }

    /**
    * @Description createFreeMakerTagArticle 自定义标签解析单个tag详情列表或多个详情列表
    **/
    @RequestMapping(value = "/tagArticleFreeMaker")
    public void createFreeMakerTagArticle(@ModelAttribute Tags tag) throws Exception{
        anakyzeFreeMakerService.createFreeMakerTagArticle(tag);
    }

}
